package com.iyao_app.http;

import com.iyao_app.MyApplication;

/**
 * 作者 :  胡家兵
 * 时间 :  2017/11/17.
 */

public class BaseUrl {


    public final static String MAP = MyApplication.isDebug() ? "http://map-testapi.iyaowoqu.com" : "http://map-api.iyaowoqu.com";
    public final static String ADDRESS = MyApplication.isDebug() ? "http://user-testapi.iyaowoqu.com" : "http://user-api.iyaowoqu.com";
    public final static String SMS = MyApplication.isDebug() ? "http://sms-testapi.iyaowoqu.com" : "http://sms-api.iyaowoqu.com";
    public final static String IM = MyApplication.isDebug() ? "http://im-testapi.iyaowoqu.com" : "http://im-api.iyaowoqu.com";
    public final static String EVENT = MyApplication.isDebug() ? "http://event-testapi.iyaowoqu.com" : "http://event-api.iyaowoqu.com";
    public final static String SHARE = "http://m.iyaowoqu.com";
    public final static String ABOUT = "http://m.iyaowoqu.com";

//    http://user-testapi.iyaowoqu.com


    public final static String SPACE_USER = "/iyao-user-web/";
    public final static String SMS_SPACE = "/iyao-sms-web/";
    public final static String IM_SPACE = "/iyao-im-web/";
    public final static String EVENT_SPACE = "/iyao-event-web/";
    public final static String MAP_SPACE = "/iyao-map-web/";
    public final static String SHARE_SPACE = "/iyao-mobile/";
    public final static String ABOUT_SPACE = "/iyao-mobile/about/aboutUs.html";


    public static String getAddress(String interfaceName) {
        return String.format("%s%s%s", ADDRESS, SPACE_USER, interfaceName);
    }

    public static String getSMS(String interfaceName) {
        return String.format("%s%s%s", SMS, SMS_SPACE, interfaceName);
    }

    public static String getEvent(String interfaceName) {
        return String.format("%s%s%s", EVENT, EVENT_SPACE, interfaceName);
    }

    public static String getMap(String interfaceName) {
        return String.format("%s%s%s", MAP, MAP_SPACE, interfaceName);
    }

    public static String getAttention(String interfaceName) {
        return String.format("%s%s%s", IM, IM_SPACE, interfaceName);
    }

    public static String getShare(String interfaceName) {
        return String.format("%s%s%s", SHARE, SHARE_SPACE, interfaceName);
    }

    public static String getAbout() {
        return String.format("%s%s", ABOUT, ABOUT_SPACE);
    }

    public static String getShare() {
        return String.format("%s%s", ABOUT, SHARE_SPACE);
    }
}
